using System.Collections.Generic;
using UnityEngine;

namespace Gameplay.PVE.Config
{
    public class PveSkillConfig
    {
        public int id;
        public int cost;
        public int energy;
        public string skill_icon;
        public string name;
        public string desc;
        public float storage_time;//蓄力阶段时间
        public float attack_cast_time;//始发阶段时间
        public float attack_recover_time;//后摇时间
        public int type;// 1技能  2被动触发技能  3站立射击  4移动射击
        public int trigger_type;//0进场触发  1受到伤害触发  2命中后触发 3击杀触发 4 血量达到一定值触发 5 射击一定次数触发
        public List<float> trigger_params;//参数
        public List<Vector3> effects;
        public List<Vector3Int> bullets;//x：第几帧 30/s  y：子弹id  z：子弹分组（枪口)
        public List<Vector3> change_bullets;
        public List<Vector3> bullet_birth_rotation;
        public List<int> additive_elements;
        public int search_team;
        public List<int> search_tag_list;
        public List<int> search_tag_black_list;
        public int search_sort;
        public int search_count;
        public int single_max_bullet;
        
        public int cast_type;//0 原地释放  1 移动到目标点释放 2 闪避射击  3 扫射  4 射击前推 5 追踪敌人 6 过去回来

        public List<float> cast_param;
        public int summon_id;

        public string action_name;
        public string storage_name;
        public string recover_name;

        public List<string> sound_name;
        public List<Vector3Int> sound_frame;
        
        public float cd;
        public float born_cd;
        public float move_speed;
        public int move_state;

        public float cast_range;
        public List<int> child_skills;
        public List<Vector3Int> replace_skills;

        public int weapon_id;

        public int apply_movement;

        public int rigid_intensity;
        public int rigid_break;

        public string camera_animation;


        //无用字段
        /*public float bulletStartTime;
        public int bulletCount;
        public float shootDuration;
        public float backPlayTime;
        public float backPlaySpeed;
        public List<Vector3> movePositions;
        public int repeatCount;
        public float moveTime;*/

        public float GetTriggerParam(int index = 0)
        {
            if (trigger_params != null && trigger_params.Count > index)
            {
                return trigger_params[index];
            }

            return 0;
        }

        public float GetCastParam(int index = 0)
        {
            if (cast_param != null && cast_param.Count > index)
            {
                return cast_param[index];
            }

            return 0;
        }
    }
}